package com.rinvay.asdownloader.platform.logger;

import android.util.Log;

import com.rinvay.utils.logger.Appender;
import com.rinvay.utils.logger.Logger;

public class AndroidAppender extends Appender
{

    public synchronized void printTrace(String tag, int level, String trace) {
        tag = "[ASD][" + tag + "]";
        switch (level)
        {
        case Logger.DEBUG_LEVEL:
            Log.d(tag, trace);
            break;
        case Logger.INFO_LEVEL:
            Log.i(tag, trace);
            break;
        case Logger.WARN_LEVEL:
            Log.w(tag, trace);
            break;
        case Logger.ERROR_LEVEL:
        case Logger.FATAL_LEVEL:
            Log.e(tag, trace);
            break;
        default:
            Log.v(tag, trace);
            break;
        }
    }

}
